//
//  SINAServicePariseViewController.m
//  sinashebao
//
//  Created by  androidlongs on 2017/12/21.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import "SINAServicePariseViewController.h"
#import "XHStarRateView.h"

@interface SINAServicePariseViewController ()


//承接任务难度
@property (weak, nonatomic) IBOutlet UIView *receiveTasksView;
//承接任务态度
@property (weak, nonatomic) IBOutlet UIView *receiveAttitudView;
//承接任务满意度
@property (weak, nonatomic) IBOutlet UIView *completeSatisfactionView;
//头像
@property (weak, nonatomic) IBOutlet UIImageView *titleImageView;

//实名
@property (weak, nonatomic) IBOutlet UILabel *realNameLabel;


@end

@implementation SINAServicePariseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    [self configNavigationItem];
    [self initViewFunction];
    // Do any additional setup after loading the view from its nib.
}

-(void)viewWillAppear:(BOOL)animated{
    self.navigationController.navigationBarHidden = NO;
}

-(void)initViewFunction{
    
    CGFloat paddingLeft=0;
    CGFloat paddingTop=5;
    CGFloat rateViewWidth=140;
    CGFloat rateViewHeight=18;
    
    //承接任务难度评分
    XHStarRateView *receiveTasksRateView = [[XHStarRateView alloc] initWithFrame:CGRectMake(paddingLeft, paddingTop, rateViewWidth, rateViewHeight) numberOfStars:5 selectNumberStars:3 rateStyle:HalfStar isAnination:YES finish:^(CGFloat currentScore) {
        NSLog(@"4----  %f",currentScore);
    }];
    
    receiveTasksRateView.isTouch=NO;
    
    [self.receiveTasksView addSubview:receiveTasksRateView];
    
    //承接任务态度评分
    XHStarRateView *receiveAttitudeRateView = [[XHStarRateView alloc] initWithFrame:CGRectMake(paddingLeft, paddingTop, rateViewWidth, rateViewHeight) numberOfStars:5 selectNumberStars:3 rateStyle:HalfStar isAnination:YES finish:^(CGFloat currentScore) {
        NSLog(@"4----  %f",currentScore);
    }];
    [self.receiveAttitudView addSubview:receiveAttitudeRateView];
    //完成满意度评分
    XHStarRateView *completeSatisfactionRateView = [[XHStarRateView alloc] initWithFrame:CGRectMake(paddingLeft, paddingTop, rateViewWidth, rateViewHeight) numberOfStars:5 selectNumberStars:3 rateStyle:HalfStar isAnination:YES finish:^(CGFloat currentScore) {
        NSLog(@"4----  %f",currentScore);
    }];
    
    [self.completeSatisfactionView addSubview: completeSatisfactionRateView];
}
-(void)configNavigationItem{
    self.navigationController.navigationBarHidden = NO;
    self.navigationItem.title=@"服务评价";
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0/255 green:198.0/255 blue:174.0/255 alpha:0.8f];
    self.navigationController.navigationBar.translucent = NO;
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18],
                                                                      NSForegroundColorAttributeName:[UIColor whiteColor]}];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
